package com.jk.web.service;

import com.jk.common.model.AddressBean;
import com.jk.common.model.OrderBean;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;


@FeignClient(name = "zuul-server")
public interface ShopService {

    @RequestMapping("/order-server/order/saveUserAddress")
    void saveUserAddress(@RequestBody AddressBean addressBean);

    @RequestMapping("/order-server/order/generateOrderId")
    Map generateOrderId(@RequestParam("userId") String userId, @RequestParam("flowerIds") String flowerIds);

    @RequestMapping(value = "/order-server/order/orderSave",consumes ="application/json" )
    Boolean orderSave(@RequestBody OrderBean orderBean);

    @RequestMapping(value = "/order-server/order/findUserAddress")
    AddressBean findUserAddress(@RequestParam("userId") String userId);


}
